<include file="common/header_lixin" title="财务明细" />
<div class="page">
    <div class="page-hd">
        <div class="header bor-1px-b">
    <div class="header-left">
        <a href="javascript:history.go(-1)" class="left-arrow"></a>
    </div>
    <div class="header-title">提转明细</div>
    <div class="header-right">
        <a href="#"></a>
    </div>
</div>
    </div>

    <div class="page-bd">
        <!-- 页面内容-->
        <div class="weui-tab">
            <!--<div class="weui-navbar">
               &lt;!&ndash; <a class="weui-navbar__item weui-bar__item&#45;&#45;on"  id="status1" page="1"  href="#tab1">
                    可售余额明细
                </a>&ndash;&gt;
               &lt;!&ndash; <a class="weui-navbar__item weui-bar__item&#45;&#45;on"  id="status1" page="1"  href="#tab1">
                    提转明细
                </a>&ndash;&gt;
               &lt;!&ndash; <a class="weui-navbar__item"  id="status2" status="1" page="1"  onClick="init2()"  href="#tab2">
                    直推奖励明细
                </a>
                <a class="weui-navbar__item"  id="status3" status="1" page="1" onClick="init3()" href="#tab3">
                    矿池钱包明细
                </a>&ndash;&gt;
            &lt;!&ndash;    <a class="weui-navbar__item"  id="status3" status="1" page="1" onClick="init3()" href="#tab3">
                    矿池资产明细
                </a>&ndash;&gt;
            </div>-->
            <div class="weui-tab__bd">
                <div id="tab1" class="weui-tab__bd-item weui-tab__bd-item--active status1">
                    <div class="income_table mt30">
                        <table width="100%" id="all">
                            <tr>
                                <th>记录时间 </th>
                                <th>变动</th>
                                <th>类型</th>
                                <th>说明</th>
                            </tr>
                        </table>
                    </div>
                </div>
                <div id="tab2" class="weui-tab__bd-item status2">
                    <div class="income_table mt30">
                        <table width="100%" id="come">

                        </table>
                    </div>
                </div>
                <div id="tab3" class="weui-tab__bd-item status3    ">
                    <div class="income_table mt30">
                        <table width="100%"  id="out">

                        </table>
                    </div>
                </div>
            </div>
        </div>
        <include file="common/footer_lixin"/>
    </div>
</div>

<script>
    $(function() {
        FastClick.attach(document.body);
    });
</script>
<script>
var ajax_status1 = false;
var ajax_status2 = false;
var ajax_status3 = false;
var countToady6 = "{$count6}";
var countToady7 = "{$count7}";
init();

    function init(){
        if (ajax_status1) return;
        ajax_status1 = true;
        loadlist(1,1);
    }

    // 加载更多商品
    $('#tab1').infinite(30).on("infinite", function() {
        if (ajax_status1) return;
        ajax_status1 = true;

        var p = $('#status1').attr('page');
        p++;
        $('#status1').attr('page',p)
        loadlist(p,1);

    });

    function loadlist(p,status){
        $.ajax({
            url : "/Acc/Member/ajax_tz_log/p/"+ p,
            type:'post',
            dataType:'json',
            data:{'p': p,'type' : status},
            success:function(data){
                console.log(countToady6,1111)
                var subject = '';
                if (status == 1) {
                    subject = 'all';
                   /* if (p == 1){
                        $('#'+subject).prepend("<tr>\n" +
                            "                                <td>当日收益</td>\n" +
                            "                                <td>"+countToady6+"</td>\n" +
                            "                            </tr>");
                    }*/
                } else if(status == 2){
                    subject = 'come';
                    /*if (p == 1){
                        $('#'+subject).prepend("<tr>\n" +
                            "                                <td>当日收益</td>\n" +
                            "                                <td>"+countToady7+"</td>\n" +
                            "                            </tr>");
                    }*/
                }else {
                    subject = 'out';
                }

               if($.trim(data)==''){
                    $.toptip('无更多数据', 'error');
                }else{
                    $('#'+subject).append(data);
                    ajax_status1 = false;
                    ajax_status2 = false;
                    ajax_status3 = false;
                }
            },
            error:function(){
                showErrorMsg('网络异常，请稍后再试')
            }
        })
    }
</script>
</body>
</html>
